package com.mcxx.modules.miniSalvation.check.service.read;

import com.mcxx.modules.base.utils.QueryParamUtil;
import com.mcxx.modules.filemanage.easypoi.util.ExportExcelService;
import com.mcxx.modules.filemanage.file.service.FileService;
import com.mcxx.modules.miniSalvation.check.dao.read.DepartmentDataReadDao;
import com.mcxx.modules.miniSalvation.check.dto.DepartmentDataDTO;
import com.mcxx.modules.miniSalvation.check.dto.IntegrateCheckDTO;
import com.mcxx.modules.miniSalvation.check.param.DepartmentDataSearchParam;
import com.mcxx.modules.system.service.write.TaskExportWriteService;
import com.yinhai.ta404.core.restservice.requestbean.PageParam;
import com.yinhai.ta404.core.restservice.resultbean.Page;
import com.yinhai.ta404.core.security.vo.UserAccountVo;
import com.yinhai.ta404.core.service.BaseService;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;



@Service
@TaTransactional(readOnly = true)
public class DepartmentDataReadService extends BaseService {

    @Autowired
    private DepartmentDataReadDao dataReadDao;

    public Page selectDepartmentDataList(DepartmentDataSearchParam param, PageParam pageParam, UserAccountVo accountVo){

        QueryParamUtil.setBaseParamValue(param,accountVo);


        dataReadDao.beginPager(pageParam);
        List<DepartmentDataDTO> list = dataReadDao.selectListByParam(param);


        return dataReadDao.endPager(list);
    }

    public int selectCountById(String idcard){
        return dataReadDao.selectCountById(idcard);
    }

    public int selectCountByArea(String county,String street,String community){
        return dataReadDao.selectCountByArea(county,street,community);
    }

    public String selectAreaCodeByArea(String county,String street,String community){
        return dataReadDao.selectAreaCodeByArea(county,street,community);
    }

   public  List<IntegrateCheckDTO> selectCheckInfo(List<String> list){
       return dataReadDao.selectCheckInfo(list);
   }

    public List<DepartmentDataDTO> selectObjectInCheck(List<String> list){
        return dataReadDao.selectObjectInCheck(list);
    }
}
